<?php

use Illuminate\Support\Facades\Route;

// Generate new Pets
Route::get('/', function () {
    return env('APP_DEBUG')
        ? json_encode(\App\Models\Pet::factory()->count(7)->create(), JSON_THROW_ON_ERROR)
        : view('welcome');
});

// Telegram Bot WebHook
Route::post(
    config('telegram.bots.pet.token').'/webhook',
    'App\Http\Controllers\Api\TelegramController@handleWebhook')
    ->name('telegram.webhook')
    ->withoutMiddleware([\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class]);
